package com.chainyoung.component_tmperson.ui.mvp.contract;

import com.chainyoung.common.appcommon.entity.HdWalletCache;
import com.chainyoung.common.appcommon.entity.HdWalletTokenCache;
import com.chainyoung.common.appcommon.entity.Version;
import com.chainyoung.common.appcommon.hdwallet.TokenBalance;
import com.chainyoung.common.mvp.IModel;
import com.chainyoung.common.mvp.IView;

import java.util.List;

import io.reactivex.Flowable;

public interface HdWalletTokenListContract {

    interface View extends IView {

        void onGetAllTokenTransfersSuccessed(String data);

        void onGetAllTokenTrasferFailed();

        void onGetTokenBalanceSuccessed(TokenBalance data);

        void onGetTokenBalanceFailed(String contractAddr);


        void onGetAllHdWalletTokenCaches(List<HdWalletTokenCache> datas);

        void onAddHdWalletCacheTokenSuccess(HdWalletTokenCache data);

        void onGetAllTokenNamesSuccessed(String data);

    }


    interface Model extends IModel {

        Flowable<String> getAllTokenTransfers(String address);

        Flowable<TokenBalance> getTokenBalance(String contractAddr, String addr);


        Flowable<List<HdWalletTokenCache>> getAllHdWalletTokenCaches(String coinType);

        Flowable<HdWalletTokenCache> addHdWalletTokenCache(HdWalletTokenCache item);

        Flowable<String> getTokenNames();

    }



}
